package com.blb.mybatis.service.impl;

import com.blb.mybatis.entity.Goods;
import com.blb.mybatis.mapper.GoodsMapper;
import com.blb.mybatis.service.GoodsService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class GoodsServiceImpl implements GoodsService {

    @Autowired
    private GoodsMapper goodsMapper;

    public List<Goods> selectAll() {
        return goodsMapper.selectAll();
    }

    public void delGoods(Long id) {
        goodsMapper.delGoods(id);
    }

    public void addGoods(Goods goods) {
        goodsMapper.addGoods(goods);
    }

    public void updateGoods(Goods goods) {
        goodsMapper.updateGoods(goods);
    }
}
